﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{

    class Program
    {
        static void Main(string[] args)
        {
            Type type = typeof(Name);
            Type type1 = typeof(GuessGame);

            Class1 class1 = new Class1();
            Game game = new Game();
            Judge judge = new Judge();
            YesNo yesNo = new YesNo();

            Console.WriteLine("**********************************");
            Console.WriteLine("*********** 猜拳，开始 ***********");
            Console.WriteLine("**********************************");

            class1.check();//选择npc与命名
            yesNo.Play();//是否开始游戏
            if (yesNo.falg)
            {
                while (yesNo.falg1)//是否继续
                {
                    game.use();//玩家出拳
                    game.npc();//npc出拳
                    judge.judge1();//判断输赢
                    yesNo.coming();//是否继续
                }
            }

            Console.WriteLine("=========结束=========");
            Console.WriteLine("{0} VS {1} 对战", class1.usename, class1.npcname);
            Console.WriteLine("姓名      得分");
            Console.WriteLine(class1.usename + "      " + judge.useMark);
            Console.WriteLine(class1.npcname + "      " + judge.npcMark);
            Console.WriteLine("结果：{0}赢，{1}是笨蛋", class1.usename, class1.npcname);
            yesNo.Again();
            if (yesNo.falg2)
            {
                class1.check();//是否重开游戏
            }
            else
            {
                Console.WriteLine("退出系统");
            }
        }

    }
}
